﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LotteryVote.Entity;
using LotteryVote.Logic;
using LotteryVote.Utility;
using LotteryVote.Entity.Bet;
using LotteryVote.Logic.Web;

namespace LotteryVote
{
    public partial class BetRollParlay : MemberPage
    {
        public IList<LotteryCompany> TodayCompany { get; set; }
        protected void Page_Load(object sender, EventArgs e)
        {
            TodayCompany = TodayLotteryCompany.Instance.GetTodayCompany();
        }

        protected void btn_addBet_Click(object sender, EventArgs e)
        {
            var betList = JSONHelper.ToObject<List<BetItem>>(hd_json.Value);
            BetFacade betFacade = new BetFacade();
            betFacade.AddBet(CurrentUser, 1, betList);
        }
    }
}